generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 396
Batch File Operations for fs_read and fs_write #1772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1772 +/- ##
=======================================
Coverage 16.75% 16.75%
=======================================
Files 213 213
Lines 20704 20704
Branches 871 871
=======================================
Hits 3468 3468
Misses 17236 17236 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Created issue #1773 to track the implementation of this feature once the RFC is approved. |
cc7f635 to
0d8c4ee
Compare
* [feat]: Add a new semantic_search_client crate that provides vector embedding and
semantic search capabilities for the Amazon Q CLI. This implementation:
- Supports text embedding generation using Candle and ONNX runtimes
- Provides hardware acceleration via Metal on macOS
- Implements efficient vector indexing for semantic search
- Includes file processing utilities for various file types
- Supports persistent storage of semantic contexts
- Includes comprehensive test coverage
This crate will enable memory bank functionality for Amazon Q, allowing
users to create, manage, and search through semantic memory contexts.
🤖 Assisted by [Amazon Q Developer](https://aws.amazon.com/q/developer)
* Update semantic_search_client dependencies in Cargo.toml
* Refactor embedder implementation for Linux platforms to use trait objects
This change modifies the semantic search client to use Box<dyn TextEmbedderTrait>
on Linux platforms instead of directly using CandleTextEmbedder. This provides
more flexibility and consistency with the implementation on macOS and Windows,
allowing for better extensibility and polymorphic behavior across all platforms.
* Update Cargo.lock file
* Remove redundant CandleTextEmbedder import for non-macOS/Windows platforms
* fix(semantic_search): Update conditional compilation flags for embedders
Update conditional compilation flags to match the new embedding model selection logic:
- Replace target_env="musl" conditions with target_os conditions
- Update TextEmbedder trait implementation to use macOS/Windows condition
- Ensure consistent conditions across all files
🤖 Assisted by [Amazon Q Developer](https://aws.amazon.com/q/developer)
---------
Co-authored-by: Kenneth Sanchez V <[email protected]>
Co-authored-by: Kenneth Sanchez V <[email protected]>
* fix Build * fix: Removes flakey test --------- Co-authored-by: Kenneth Sanchez V <[email protected]>
0d8c4ee to
3c14966
Compare
Implement comprehensive batch operations for fs_read and fs_write tools: - Add operations-based structure to fs_read with multiple operation types - Implement batch processing for fs_write to handle multiple files and edits - Add BatchReadResult and BatchWriteResult for consistent response formats - Standardize tool summary display with improved parameter handling - Add comprehensive test coverage for all new functionality - Optimize performance by reducing separate tool calls for multiple files - Improve error handling and reporting for batch operations This feature significantly improves performance and usability when working with multiple files by reducing the number of separate tool calls needed. 🤖 Assisted by [Amazon Q Developer](https://aws.amazon.com/q/developer)
c5f1a6a to
e910513
Compare
Implement improved edit ordering approach for fs_write tool: - Sort operations by type priority (Create/Rewrite first, line-based operations, string operations, append last) - Give ReplaceLines, DeleteLines, and Insert operations the same priority - Apply line-based operations from bottom to top to avoid line number shifting - Eliminate redundant line number adjustment logic Enhance UI formatting: - Use green ticks for successful operations - Use red exclamation marks for errors - Use neutral bullets for summary lines - Only color the symbols, not the text that follows them Update tool_index.json documentation to clearly explain the edit ordering approach and explicitly state that LLMs should not attempt to adjust line numbers. Document the approach in code-roast.md for future reference. 🤖 Assisted by [Amazon Q Developer](https://aws.amazon.com/q/developer)
Removes an unused backup file (fs_write.rs.bak) and updates the tool descriptions in tool_index.json to improve guidance for fs_read and fs_write tools. Also updates the batch file operations RFC to reflect current implementation status. - Removed: Deleted obsolete fs_write.rs.bak file - Updated: Enhanced tool descriptions with better batching guidance - Updated: RFC documentation to accurately reflect implementation status - Added: Implementation status section to RFC with next steps 🤖 Assisted by [Amazon Q Developer](https://aws.amazon.com/q/developer)
Contributor
|
This feature has been implemented. |
auto-merge was automatically disabled
October 17, 2025 21:42
Pull request was closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This RFC proposes enhancing the fs_read and fs_write tools to support batch operations on multiple files in a single call, with the ability to perform multiple edits per file, maintain line number integrity through proper edit ordering, and perform search/replace operations across files in a folder using wildcard patterns with sed-like syntax.
Key Features
Implementation Staging
The implementation is broken down into three phases:
Benefits
Future Possibilities
The RFC also outlines future possibilities including CRDTs for versioned multi-agent changes, transaction support, conditional edits, and more advanced features.
🤖 Assisted by Amazon Q Developer